import server from '@/plugin/axios/request_axios.js'
/* eslint-disable */
/**
 * 获取所有标签组数据
 * @param {Number} data
 * @returns
 */
export function getAssetsTags(data) {
  return server('get', '/assetsTagGroup/getAssetsTagGroupPage', data)
}

/**
 * 新增标签组
 * @param {Number} data
 * @returns
 */
export function addAssetsTags(data) {
  return server('post', '/assetsTagGroup/addAssetsGroup', data)
}

/**
 * 新增标签
 * @param {Number} data
 * @returns
 */
export function addAssetsTag(data) {
  return server('post', '/assetsTag/addAssetsTag', data)
}

/**
 * 删除标签
 * @param {Number} id
 * @returns
 */
export function delAssetsTags(id) {
  // return server('delete', '/assetsTag/deleteAssetsTag', { params: { id: id }})
  return server('delete', '/assetsTag/deleteAssetsTag', { id: id })
}

/**
 * 删除标签组
 * @param {Number} id
 * @returns
 */
export function delAssetsTagsGroup(id) {
  // return server('delete', '/assetsTagGroup/deleteAssetsGroup', { params: { id: id }})
  return server('delete', '/assetsTagGroup/deleteAssetsGroup', { id: id })
}

/**
 * 批量删除标签组
 * @param {Number} ids
 * @returns
 */
export function delAllAssetsTagsGroup(ids) {
  // return server('delete', '/assetsTagGroup/deleteAssetsGroups', { params: { ids: ids.join(',') }})
  return server('delete', '/assetsTagGroup/deleteAssetsGroups', { ids: ids.join(',') })
}

/**
 * 修改标签
 * @param {Number}
 * @returns
 */
export function editAssetsTag(From) {
  return server('put', '/assetsTag/updateAssetsTag', From)
}

/**
 * 修改标签组
 * @param {Number}
 * @returns
 */
export function editAssetsTagGroup(From) {
  return server('put', '/assetsTagGroup/deleteAssetsTahGroup', From)
}

/**
 * 查询详情，修改标签
 * @param {Number}
 * @returns
 */
export function getAssetsTagById(id) {
  return server('get', '/assetsTag/getAssetsTag', id)
}

/**
 * 根据标签组id查询详情
 * @param {Number}
 * @returns
 */
export function getAssetsTagGroupById(id) {
  return server('get', '/assetsTagGroup/getAssetsTagGroupById', id)
}
